#!/bin/bash 

INST_PATH=`pwd`/../install

#SQLITE_VERION=sqlite-autoconf-3410200
SQLITE_VERION=sqlite-autoconf-3380200

if [ -e $INST_PATH/lib/libsqlite3.so ] ; then
	exit ;
fi

if [ ! -e $SQLITE_VERION.tar.gz ] ; then
	wget http://master.iot-yun.club:2211/src/$SQLITE_VERION.tar.gz
	#wget https://sqlite.org/2023/$SQLITE_VERION.tar.gz
fi

if [ ! -d $SQLITE_VERION ] ; then
	tar -xzf $SQLITE_VERION.tar.gz 
fi

cd $SQLITE_VERION
./configure --prefix=${INST_PATH} --enable-static

make && make install

